/*
*
==============================================================================
*  Name        : 
*  Part of     : Omen Game Engine
*  Description : 
*  Version     : 1.0
*
*  Copyright (c) 2013 Lauri Kortevaara.
* 
==============================================================================
*/

#pragma once

#include "OmenConfig.h"
#include "IOmenObject.h"
#include "IOmenRenderer.h"
#include "IOmenOctree.h"

namespace Omen
{
    class OMEN_API IScene : public Omen::IObject
    {
    public:
        virtual Omen_GUID classId() const = 0;                    /// <summary>Return class ID of scene</summary>

        /// Scene merging
        virtual void            mergeScene( const IScene* pOtherScene ) = 0;                        /// <summary>Add the contents of the given scene to this scene</summary>

        /// cameras
        virtual void            addCamera ( const ICamera* pCamera ) = 0;                    /// <summary>Add a new camera to the scene</summary>
        virtual unsigned long            cameraCount() const = 0;
        virtual void            getCameras( ICamera** pListCameras, unsigned long maxListSize ) const = 0; /// <summary>Add a new camera to the scene</summary>
        virtual ICamera*        currentCamera() const = 0;                                    /// <summary>Return currently active camera</summary>
        virtual void            setCurrentCamera( const ICamera* pCamera ) const = 0;                /// <summary>Sets the currently active camera</summary>
        virtual ICamera*        getCamera( unsigned long iCamera ) const = 0;

        /// models
        virtual void            addModel( const IModel* pModel ) = 0;                        /// <summary>Add a new Model to the scene</summary>
        virtual void            getModels( IModel** pListModels, unsigned long maxListSize ) const = 0;    /// <summary>Add a new Model to the scene</summary>
        virtual unsigned long   modelCount() const = 0;
        virtual IModel*         getModel( unsigned long iModel ) const = 0;
        virtual IModel*         findModel( const std::wstring& modelName ) const = 0;

        /// lights
        virtual void            addLight( const ILight* pLight ) = 0;                        /// <summary>Add a new Light to the scene</summary>
        virtual void            getLights( ILight** pListLights, unsigned long maxListSize ) const = 0;    /// <summary>Add a new Light to the scene</summary>
        virtual unsigned long   lightCount() const = 0;
        virtual ILight*         getLight( unsigned long iLight ) const = 0;

        // Octree
        virtual Omen::IOctree*  createOctree( unsigned int maximumDepth, unsigned int minimumFaceCount ) = 0;
        virtual void            setOctree( Omen::IOctree* pOctree ) = 0;                    /// <summary>Set the current octree representing the current model in 3d-space</summary>
        virtual Omen::IOctree*  octree() const = 0;                                         /// <summary>Returns the current octree</summary>

        /// rendering interface
        virtual void            render( const IRenderer* pRenderer) const = 0;               /// <summary>Render this scene using given renderer</summary>

        /// collision detection
        virtual void            checkCollisions() = 0;
    protected:
    private:
    };
}